<?php
session_start();
require_once '../dao/membersdao.php';
require_once '../dto/memberdto.php';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $UserName = $_POST["tbusername"];
    $Password =$_POST["tbpassword"];
//    $membersdao = new membersdao();
    $result = membersdao::GetMemberByUsernameAndPassword($UserName,$Password);
    if($result->getUserID() != NULL){
        $_SESSION["member"]=$result;
        $_SESSION["Name"]=$result->getUserID();
        header("location:../page/home.php");
    }else{
        header("location:../page/errorpage.php");
    }       
?>
